package com.example.hellodemo.constraint;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.hellodemo.R;

public class ConstraintActivity extends AppCompatActivity {
    private Button constraintLayoutBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_constraint);


        constraintLayoutBtn = findViewById(R.id.constraint_btn);
        constraintLayoutBtn.setOnClickListener(listener);

    }
    private View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = null;
                switch (v.getId()){
                    case R.id.constraint_btn:
                        intent = new Intent(ConstraintActivity.this,ConstraintLayoutActivity.class);
                        break;
                }
                if (intent != null){
                    startActivity(intent);
                }
        }

    };
}
